import axios from 'axios'

export function uploadFile(data){
    const service = axios.create({
        baseURL:'/api',
        timeout: 3000,  
        headers:{'Content-Type':'multipart/form-data'}
    })
    //相当于调用service.post。。注意key是 data而不是params
    return service({
        url: 'goods/upload',
        method: 'post',
        data: data
    })
}